09 异步I_O模型和Lock-Free编程
异步 I/O 模型
《UNIX 网络编程》6.2 I/O Models 中介绍了五种 I/O 模型:
- 阻塞 I/O
- 非阻塞 I/O
- I/O 的多路复用(select 和 poll)
- 信号驱动的 I/O(SIGIO)
- 异步 I/O(POSIX 的 aio_functions)
- Thousands of Threads and Blocking I/O: The Old Way to Write Java Servers Is New Again (and Way Better) 回顾和比较了各种 I/O 模型,和各种细节的方案和说明
- Scalable IO in Java 了解相关概念
- 各种异步 I/O 的实现和设计方式:
- IBM - Boost application performance using asynchronous I/O 关于 AIO 的文章
- Lazy Asynchronous I/O For Event-Driven Servers
- Windows I/O Completion Ports 异步 I/O 模型的 MSDN 手册,或更易懂的 Inside I/O Completion Ports。I/O Processing Windows上的I/O
- Libevent 2.0 book
- Libuv Design Overview
异步 I/O 模型的发展技术: select -> poll -> epoll -> aio -> libevent -> libuv
- 编程模式——Reactor 模式
- The Secret To 10 Million Concurrent Connections -The Kernel Is The Problem, Not The Solution C10M 问题
Lock-Free 编程相关
- 关于无锁的数据结构
- Is Parallel Programming Hard, And, If So, What Can You Do About It?
- 了解并发编程中的一些概念
- Implementing Lock-Free Queues 介绍无锁队列的实现
- Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms 给出了一个无阻塞和阻塞的并发队列算法
- 相关博客推荐
- 1024cores 德米特里·伐由科夫(Dmitry Vyukov)的和 lock-free 编程相关的网站
- Paul E. McKenney 保罗(Paul)的个人网站
- Concurrency Freaks 关于并发算法和相关模式的网站
- Preshing on Programming 加拿大程序员杰夫·普莱辛(Jeff Preshing)的技术博客,主要关注 C++ 和 Python 两门编程语言
- Sutter’s Mill 赫布·萨特(Herb Sutter)杰出的 C++ 专家,博客有关于 C++ 语言标准最新进展的信息,也有他的演讲视频
- Mechanical Sympathy 马丁·汤普森(Martin Thompson)探索现代硬件的功能,并提供开发、培训、性能调优和咨询服务,博客主题是 Hardware and software working together in harmony,里面探讨了如何设计和编写软件使得它在硬件上能高性能地运行
其它
- All about 64-bit programming in one place 关于 64 位编程相关的收集页面
- What Scalable Programs Need from Transactional Memory 事务性内存(TM)的研究
- Improving OpenSSL Performance 教你如何提高 OpenSSL 的执行性能,和一些底层的性能调优知识
- How eBay’s Shopping Cart used compression techniques to solve network I/O bottlenecks 讲述eBay 如何通过压缩数据来提高整体服务性能
- Linkedin: Boosting Site Speed Using Brotli Compression 讲述什么是 Brotli 以及与其它压缩程序的比较和所带来的性能提升
- Performance Testing with SSDs, Part 1 和 Performance Testing with SSDs Part 2 介绍了测试 SSD 硬盘性能以及相关的操作系统调优方法
- Secure Programming HOWTO - Creating Secure Software 讲了 Linux/Unix 下的一些安全编程方面的知识
相关论文
Hints for Computer System Design 计算机设计的忠告,总结了他在做系统设计时的一些想法
The 5 minute rule for trading memory for disc accesses and the 5 byte rule for trading memory for CPU time 5 分钟法则是用来衡量内存与磁盘的,而 5 字节法则则是在内存和 CPU 之间的权衡